import request from '@/utils/request'
// export function getRoutes() {
//   return request({
//     url: '/vue-element-admin/routes',
//     method: 'get'
//   })
// }

export function getRoutes() {
  return request({
    url: 'http://rap2.taobao.org:38080/app/mock/222823/index/menu',
    method: 'get'
  })
}
// export function getRoles() {
//   return request({
//     url: '/vue-element-admin/roles',
//     method: 'get'
//   })
// }
export function getRoles() {
  return request({
    url: 'http://rap2.taobao.org:38080/app/mock/222823/index/info',
    method: 'get'
  })
}

export function addRole(data) {
  return request({
    url: '/vue-element-admin/role',
    method: 'post',
    data
  })
}

export function updateRole(id, data) {
  return request({
    url: `/vue-element-admin/role/${id}`,
    method: 'put',
    data
  })
}

export function deleteRole(id) {
  return request({
    url: `/vue-element-admin/role/${id}`,
    method: 'delete'
  })
}
